//
//  VideoItem.h
//  VidCrusher
//
//  Created by Cemil Browne on 4/06/08.
//  Copyright 2008 Cemil Browne. All rights reserved.
//
/*
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */ 

#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <QTKit/QTKit.h>
#import "RegexKitLite.h"

@interface VideoItem : NSObject {
	NSString *fileName; // File name
	NSString *path; // Full file path (including filename)
	NSString *fileSize; 
	BOOL CompressAvailable; // unused at the moment
	NSInteger videoType; // Type of video (tv show, movie, music video)
	NSString *showName; 
	NSString *seasonNumber;
	NSString *episodeNumber;
	QTMovie *movie; // The movie is initialized with this. 
	NSImage *posterFrame; // Poster frame from movie
	int length; // length of movie. 
}
/*
 *
 *
 *  Accessor Functions
 *
 *
 */
- (NSString *) length;
- (void) setLength:(int) aLength;

- (NSImage *)posterFrame;
- (void) setPosterFrame: (NSImage *) aPosterFrame;

- (NSString *)fileName;
- (void)setFileName:(NSString *) aString;

- (NSString *)path;
- (void)setPath:(NSString *) aPath;

- (NSString *)fileSize;
- (void)setFileSize:(NSString *) aSize;

- (NSInteger)videoType;
- (void)setVideoType:(NSInteger)aVideoType;

- (NSString *)showName;
- (void)setShowName:(NSString *)aShowName;

- (NSString *)seasonNumber;
- (void)setSeasonNumber:(NSString *)aSeasonNumber;

- (NSString *)episodeNumber;
- (void)setEpisodeNumber:(NSString *)anEpisodeNumber;

- (BOOL)setMovie;
- (QTMovie *)movie;

- (BOOL)CompressAvailable;
- (void)setCompressAvailable:(BOOL)isAvail;
// End accessor functions

- (NSString *)stringFromFileSize:(long)theSize; // helper function to convert long into string. 
- (void) checkForTVShow; // use regexp to try to determine if filename has a TV show in it (SxxExx format)
- (id) initWithFileName:(NSString *) aFileName; // main init function. 

@end
